<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/8
 * Time: 11:11
 */
$username = $_POST['username'];
$password = $_POST['password'];


if (!empty($username) && !empty($password)) {
    $flag = md5($username.$password);
    if ($username == 'admin' && $password == '123456') {
        echo '用户'.$username.'登录成功<p>';
        echo '<a href="user.php">进入个人中心</a><p>';
            setcookie('flag',$flag,time()+24*3600);
    }else{
        echo '用户名或密码错误!';
    }
}else{
    echo '用户名或密码错误!';
}

